package com.touchfired.common.constants;

public enum  EventCode {

    ROOM_CREATED("ROOM_CREATED", "房间创建"),
    ROOM_JOIN("ROOM_JOIN", "加入房间"),

    CLIENT_CONNECTING(null,"客户端连接中"),
    CLIENT_CONNECTED("PADDING_JOINING", "客户端已连接"),
    CLIENT_CONNECTED_DIS(null, "客户端已断开"),
    PADDING_JOINING("PADDING_JOINING", "等待加入或创建"),
    CLIENT_NOTIFY(null, "客户端通知"),
    ROOM_SETTINGS("ROOM_SETTINGS", "房间设置"),
    ROOM_PADDING("ROOM_PADDING", "房间等待玩家加入"),
    ROOM_QUIT("ROOM_PADDING", "退出房间"),
    GAME_STARTED("GAME_STARTED", "游戏开始"),
//,
//    CLIENT_NAME_SET("设置用户名"),
//    ROOM_GET("获取房间"),
//    ROOM_CHAT("聊天室"),
//    ROOM_DESTORY("房间摧毁"),
//    ROOM_NOTIFY("房间通知"),
//    GAME_STARTING("游戏准备中"),
//    GAME_RESTARTING("游戏重新开始"),
//    GAME_CREATED("游戏创建"),
//    GAME_TURNING("游戏轮询"),
//    GAME_TURNED("游戏轮询结束"),
//    GAME_TURNED_SAME("游戏轮询结束票数相同处理"),
//    GAME_PROCESS("游戏判断处理"),
//    GAME_ENDED("游戏结束"),
//    GAME_CONTINUE("游戏继续"),
//    GAME_SPEAKER_INFO("玩家发言汇总"),
//    GAME_SPEAKER_PROCESSING("发言人处理中"),
//    GAME_SPEAKER_WAITING("等待发言人"),
//    GAME_SPEAKER_VOTE("玩家投票"),
//    GAME_VOTE("投票汇总"),
//    GAME_VOTE_PROCESSING("投票汇总处理中"),
//    GAME_VOTE_PROCESSED("投票汇总处理完毕"),
    ;

    private String targetCode;
    private String msg;

    EventCode(String targetCode, String msg) {
        this.targetCode = targetCode;
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public EventCode getTargetCode() {
        if (this.targetCode != null) {
            return EventCode.valueOf(this.targetCode);
        }
        return null;
    }
}
